<?php

namespace app\api\controller\v25;

use app\api\controller\v13\Auth2;
use app\common\cachemodel\ZlGoddessState;
use app\common\lib\ConfigManage;

/**
 * 女神动态相关
 * @version 2.0.0
 * Class GoddessState
 */
class GoddessState extends Auth2
{
    /**
     * 女神动态首页
     * @throws \Exception
     */
    public function index()
    {
        $type = input('type/d', 1); //动态类型 1=>综合，2=>视频,3=>语音,4=>文章
        //获取女神动态列表
        $goddessState = (new ZlGoddessState())->getGoddessStateFromCache($this->user, $type - 1);
        ConfigManage::articleStateAdvertisementData($goddessState['data'], $goddessState['per_page'], $goddessState['current_page']);
        return show(config('code.success'), '获取成功', $goddessState);
    }
}
